﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iLangl.Transport.Communication;

namespace iLangl.LanguageWire.Actions
{
	public class BaseLWAction : BaseSecurityAction
	{
		protected override string GetVersion()
		{
			return "1";
		}

		protected override void validate()
		{
			if (String.IsNullOrEmpty(SessionId)
				|| String.IsNullOrEmpty(PluginLiceneKey)
			)
			{
				raiseAlert(new ApplicationException("Security Action Authorization Failed!"));
			}
		}

		protected override string GetActionId()
		{
			return Guid.NewGuid().ToString();
		}

		protected override string GetName()
		{
			return string.Empty;
		}
	}
}
